<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<h2>人员列表</h2>
			<input type="text" @input="lict" v-model="mytext">
			<ul>
				<li v-for="(iten,index) in st">{{iten.nam}}-{{iten.age}}</li>
			</ul>
		</div>
		<script>
			var xm=new Vue({
				el:"#app",
				data:{
					mytext:'请输入姓名',
					st:[
						{nam:"夏东海",age:"50"},
						{nam:"马冬梅",age:"30"},
						{nam:"任嘉伦",age:"33"},
						{nam:"周杰伦",age:"45"},
						{nam:"马上来",age:"20"}
					],
					methods:{
						// lict(){
						// 	return this.st.filter((p))=>{
						// 		return p.nam.indexOf(this.mytext)
						// 	}
						// }
					}
				}
			})
		</script>
		
	</body>
</html>